﻿namespace SUNRPA.CONTROLS.IMPL.domain.flowItemParam {
    [Serializable]
    public class MouseClickNParam : BaseParam {
        //0左键、1右键
        private int buttonType;
        //0单机、1双击、2按下、3弹起
        private int clickType;
        private bool move = false;
        private MouseMoveNParam mmp;

         public MouseMoveNParam Mmp {
            get => mmp; 
            set => mmp = value;
        }

        public int ButtonType {
            get => buttonType; 
            set { 
                buttonType = value;
                NotifyPropertyChanged("ButtonType");
            }  
        }
         public int ClickType {
            get => clickType; 
            set { 
                clickType = value;
                NotifyPropertyChanged("ClickType");
            }  
        }
        public bool Move {
            get => move; 
            set { 
                move = value;
                NotifyPropertyChanged("Move");
            }  
        }

        public string GetTranslateMove() {
            if(move) { 
                return "将鼠标移至(" + mmp.PosX + "," + mmp.PosY + ")";
            } else { 
                return "";
            }
        }
        public string GetTranslateButtonType() {
            switch(this.buttonType) {
                case 0:
                    return "左键";
                case 1:
                    return "右键";
                default : return "左键";
            }
        }
        public string GetTranslateClickType() {
            switch(this.clickType) {
                case 0:
                    return "单击";
                case 1:
                    return "双击";
                case 2:
                    return "按下";
                case 3:
                    return "抬起";
                default : return "单击";
            }
        }
    }
}
